/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package idea.model.qnrlibrary;


import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;


/**
 *
 * @author rejun001
 */
@Entity
@Table( name = "custom_content_item_search_view" )
@XmlRootElement
@NamedQueries(
        {
    @NamedQuery( name = "CustomContentItemSearchView.findAll" , query = "SELECT q FROM CustomContentItemSearchView q" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findByItemId" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.itemId = :itemId" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findByQnrId" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.qnrId = :qnrId" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findByQuestId" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.questId = :questId" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findBySurvey" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.survey = :survey" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findByRefPeriod" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.refPeriod = :refPeriod" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findByItemWording" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.itemWording = :itemWording" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findByCategory" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.category = :category" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findByQuestionTitle" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.questionTitle = :questionTitle" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findByVersion" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.version = :version" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findByQuestionnairesTitle" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.questionnairesTitle = :questionnairesTitle" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findBySubTitle" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.subTitle = :subTitle" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findByFormDisplayNumber" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.formDisplayNumber = :formDisplayNumber" ) ,
    @NamedQuery( name = "CustomContentItemSearchView.findByFormNumber" , query = "SELECT q FROM CustomContentItemSearchView q WHERE q.formNumber = :formNumber" )
} )
public class CustomContentItemSearchView implements Serializable
{

    private static final long serialVersionUID = 1L;
    @Id
    @Basic( optional = false )
    @Column( name = "item_id" )
    private String itemId;
    @Column( name = "qnr_id" )
    private String qnrId;
    @Column( name = "quest_id" )
    private String questId;
    @Column( name = "survey" )
    private String survey;
    @Column( name = "ref_period" )
    private String refPeriod;
    @Column( name = "category" )
    private String category;
    @Column( name = "item_wording" )
    private String itemWording;
    @Column( name = "question_title" )
    private String questionTitle;
    @Column( name = "questionnaires_title" )
    private String questionnairesTitle;
    @Column( name = "sub_title" )
    private String subTitle;
    @Column( name = "form_display_number" )
    private String formDisplayNumber;
    @Column( name = "form_number" )
    private String formNumber;
    @Column( name = "version" )
    private BigInteger version;


    public CustomContentItemSearchView()
    {
    }


    public String getItemId()
    {
        return itemId;
    }


    public void setItemId( String itemId )
    {
        this.itemId = itemId;
    }


    public String getQnrId()
    {
        return qnrId;
    }


    public void setQnrId( String qnrId )
    {
        this.qnrId = qnrId;
    }


    public String getQuestId()
    {
        return questId;
    }


    public void setQuestId( String questId )
    {
        this.questId = questId;
    }


    public String getSurvey()
    {
        return survey;
    }


    public void setSurvey( String survey )
    {
        this.survey = survey;
    }


    public String getRefPeriod()
    {
        return refPeriod;
    }


    public void setRefPeriod( String refPeriod )
    {
        this.refPeriod = refPeriod;
    }


    public String getCategory()
    {
        return category;
    }


    public void setCategory( String category )
    {
        this.category = category;
    }


    public String getItemWording()
    {
        return itemWording;
    }


    public void setItemWording( String itemWording )
    {
        this.itemWording = itemWording;
    }


    public String getQuestionTitle()
    {
        return questionTitle;
    }


    public void setQuestionTitle( String questionTitle )
    {
        this.questionTitle = questionTitle;
    }


    public String getQuestionnairesTitle()
    {
        return questionnairesTitle;
    }


    public void setQuestionnairesTitle( String questionnairesTitle )
    {
        this.questionnairesTitle = questionnairesTitle;
    }


    public String getSubTitle()
    {
        return subTitle;
    }


    public void setSubTitle( String subTitle )
    {
        this.subTitle = subTitle;
    }


    public String getFormDisplayNumber()
    {
        return formDisplayNumber;
    }


    public void setFormDisplayNumber( String formDisplayNumber )
    {
        this.formDisplayNumber = formDisplayNumber;
    }


    public String getFormNumber()
    {
        return formNumber;
    }


    public void setFormNumber( String formNumber )
    {
        this.formNumber = formNumber;
    }


    public BigInteger getVersion()
    {
        return version;
    }


    public void setVersion( BigInteger version )
    {
        this.version = version;
    }


    @Override
    public int hashCode()
    {
        int hash = 0;
        hash += ( itemId != null ? itemId.hashCode() : 0 );
        return hash;
    }


    @Override
    public boolean equals( Object object )
    {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if ( !( object instanceof CustomContentItemSearchView ) )
        {
            return false;
        }
        CustomContentItemSearchView other = (CustomContentItemSearchView) object;
        if ( ( this.itemId == null && other.itemId != null ) || ( this.itemId != null && !this.itemId.equals( other.itemId ) ) )
        {
            return false;
        }
        return true;
    }


    @Override
    public String toString()
    {
        return "idea.model.qnrlibrary.CustomContentItemSearchView[ itemId=" + itemId + " ]";
    }

}
